﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.Skins;
using DevExpress.LookAndFeel;
using DevExpress.UserSkins;
using DevExpress.XtraBars;
using DevExpress.XtraBars.Ribbon;
using DevExpress.XtraBars.Helpers;
using DevExpress.XtraEditors;


namespace GUI
{
    public partial class frmMain : RibbonForm
    {
        public frmMain()
        {
            InitializeComponent();
            InitSkinGallery();


        }
        void InitSkinGallery()
        {
            SkinHelper.InitSkinGallery(rgbiSkins, true);
        }
       


        private void btnDonVi_ItemClick(object sender, ItemClickEventArgs e)
        {
            uc_DonVi frm = new uc_DonVi();
            pnCtr.Controls.Clear();
            pnCtr.Controls.Add(frm);
            frm.Dock = DockStyle.Fill;
        }

        private void iExit_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (XtraMessageBox.Show("Bạn có chắc muốn đóng chương trình.", "Xác Nhận", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
                this.Close();
        }

        private void iSaveAs_ItemClick(object sender, ItemClickEventArgs e)
        {
          
        }

        private void btnLop_ItemClick(object sender, ItemClickEventArgs e)
        {
            uc_Lop frm = new uc_Lop();
            pnCtr.Controls.Clear();
            pnCtr.Controls.Add(frm);
            frm.Dock = DockStyle.Fill;
        }

        private void btnHeDaoTao_ItemClick(object sender, ItemClickEventArgs e)
        {
            uc_HeDaoTao uc = new uc_HeDaoTao();
            pnCtr.Controls.Clear();
            pnCtr.Controls.Add(uc);
            uc.Dock = DockStyle.Fill;
        }

        private void btnLoaiDocGia_ItemClick(object sender, ItemClickEventArgs e)
        {
            uc_LoaiDocGia frm = new uc_LoaiDocGia();
            pnCtr.Controls.Clear();
            pnCtr.Controls.Add(frm);
            frm.Dock = DockStyle.Fill;
        }

        private void btnDanToc_ItemClick(object sender, ItemClickEventArgs e)
        {
            uc_DanToc frm = new uc_DanToc();
            pnCtr.Controls.Clear();
            pnCtr.Controls.Add(frm);
            frm.Dock = DockStyle.Fill;
        }

        private void btnChucVu_ItemClick(object sender, ItemClickEventArgs e)
        {
            uc_ChucVu frm = new uc_ChucVu();
            pnCtr.Controls.Clear();
            pnCtr.Controls.Add(frm);
            frm.Dock = DockStyle.Fill;
        }

        private void btnNgonNgu_ItemClick(object sender, ItemClickEventArgs e)
        {
            uc_NgonNgu frm = new uc_NgonNgu();
            pnCtr.Controls.Clear();
            pnCtr.Controls.Add(frm);
            frm.Dock = DockStyle.Fill;
        }

        private void btnDinhDang_ItemClick(object sender, ItemClickEventArgs e)
        {
            uc_NhaXuatBan frm = new uc_NhaXuatBan();
            pnCtr.Controls.Clear();
            pnCtr.Controls.Add(frm);
            frm.Dock = DockStyle.Fill;
        }

        private void btnTheLoai_ItemClick(object sender, ItemClickEventArgs e)
        {
            uc_TheLoaiTaiLieu frm = new uc_TheLoaiTaiLieu();
            pnCtr.Controls.Clear();
            pnCtr.Controls.Add(frm);
            frm.Dock = DockStyle.Fill;
        }

        private void btnNhaXuatBan_ItemClick(object sender, ItemClickEventArgs e)
        {
            uc_NhaXuatBan frm = new uc_NhaXuatBan();
            pnCtr.Controls.Clear();
            pnCtr.Controls.Add(frm);
            frm.Dock = DockStyle.Fill;
        }

        private void btnViTri_ItemClick(object sender, ItemClickEventArgs e)
        {
            uc_ViTriLuuTru frm = new uc_ViTriLuuTru();
            pnCtr.Controls.Clear();
            pnCtr.Controls.Add(frm);
            frm.Dock = DockStyle.Fill;
        }

        private void btnNguonCungCap_ItemClick(object sender, ItemClickEventArgs e)
        {
            uc_NguonCungCap frm = new uc_NguonCungCap();
            pnCtr.Controls.Clear();
            pnCtr.Controls.Add(frm);
            frm.Dock = DockStyle.Fill;
        }

        private void btnLinhVuc_ItemClick(object sender, ItemClickEventArgs e)
        {
            uc_LinhVuc frm = new uc_LinhVuc();
            pnCtr.Controls.Clear();
            pnCtr.Controls.Add(frm);
            frm.Dock = DockStyle.Fill;
        }

        private void btnTaiLieu_ItemClick(object sender, ItemClickEventArgs e)
        {
            uc_TaiLieu frm = new uc_TaiLieu();
            pnCtr.Controls.Clear();
            pnCtr.Controls.Add(frm);
            frm.Dock = DockStyle.Fill;
        }

        private void btnDKMCB_ItemClick(object sender, ItemClickEventArgs e)
        {
            uc_DangKyCaBiet frm = new uc_DangKyCaBiet();
            pnCtr.Controls.Clear();
            pnCtr.Controls.Add(frm);
            frm.Dock = DockStyle.Fill;
        }

        private void btnGhiTra_ItemClick(object sender, ItemClickEventArgs e)
        {
            frmGhiTra frm = new frmGhiTra();
            frm.ShowDialog();
        }

        private void btnGhiMuon_ItemClick(object sender, ItemClickEventArgs e)
        {
            frmMuonTaiLieu frm = new frmMuonTaiLieu();
            frm.ShowDialog();
        }

        private void btnDangNhap_ItemClick(object sender, ItemClickEventArgs e)
        {
            frmDangNhap frm = new frmDangNhap();
            frm.ShowDialog();
        }

        private void btnDoiMatKhau_ItemClick(object sender, ItemClickEventArgs e)
        {
            frmDoiMatKhau frm = new frmDoiMatKhau();
            frm.ShowDialog();
        }

        private void btnCNTheDocGia_ItemClick(object sender, ItemClickEventArgs e)
        {
            uc_DocGia frm = new uc_DocGia();
            pnCtr.Controls.Clear();
            pnCtr.Controls.Add(frm);
            frm.Dock = DockStyle.Fill;
        }

        private void btnViPham_ItemClick(object sender, ItemClickEventArgs e)
        {
            uc_ViPham frm = new uc_ViPham();
            pnCtr.Controls.Clear();
            pnCtr.Controls.Add(frm);
            frm.Dock = DockStyle.Fill;
        }

        private void btnBoiThuong_ItemClick(object sender, ItemClickEventArgs e)
        {
            uc_PhieuBoiThuong frm = new uc_PhieuBoiThuong();
            pnCtr.Controls.Clear();
            pnCtr.Controls.Add(frm);
            frm.Dock = DockStyle.Fill;
        }

        private void btnThamSo_ItemClick(object sender, ItemClickEventArgs e)
        {
            uc_ThamSo frm = new uc_ThamSo();
            pnCtr.Controls.Clear();
            pnCtr.Controls.Add(frm);
            frm.Dock = DockStyle.Fill;
        }

        private void btnDanhSachGhiMuon_ItemClick(object sender, ItemClickEventArgs e)
        {
            uc_GhiMuon frm = new uc_GhiMuon();
            pnCtr.Controls.Clear();
            pnCtr.Controls.Add(frm);
            frm.Dock = DockStyle.Fill;
        }

        private void btnDanhSachGhiTra_ItemClick(object sender, ItemClickEventArgs e)
        {
            uc_GhiTra frm = new uc_GhiTra();
            pnCtr.Controls.Clear();
            pnCtr.Controls.Add(frm);
            frm.Dock = DockStyle.Fill;
        }

        private void btnQuaHan_ItemClick(object sender, ItemClickEventArgs e)
        {
            uc_QuaHan frm = new uc_QuaHan();
            pnCtr.Controls.Clear();
            pnCtr.Controls.Add(frm);
            frm.Dock = DockStyle.Fill;
        }



        private void btnPhieuPhat_ItemClick(object sender, ItemClickEventArgs e)
        {
            
        }

        private void btnTimKiemTaiLieu_ItemClick(object sender, ItemClickEventArgs e)
        {
            uc_TimKiemTaiLieu frm = new uc_TimKiemTaiLieu();
            pnCtr.Controls.Clear();
            pnCtr.Controls.Add(frm);
            frm.Dock = DockStyle.Fill;
        }

        private void btnPhanQuyen_ItemClick(object sender, ItemClickEventArgs e)
        {
            uc_PhanQuyen frm = new uc_PhanQuyen();
            pnCtr.Controls.Clear();
            pnCtr.Controls.Add(frm);
            frm.Dock = DockStyle.Fill;
        }

        private void btnNhatKy_ItemClick(object sender, ItemClickEventArgs e)
        {
            uc_NhatKy frm = new uc_NhatKy();
            pnCtr.Controls.Clear();
            pnCtr.Controls.Add(frm);
            frm.Dock = DockStyle.Fill;
        }

    }
}